Options
The fundamental logic is no arbitrage: an option is priced as the cost of a portfolio of the underlying and a risk-free bond that replicates its payoff.
Binomial Option Valuation
Basic Formula
Given risk neutrality, the formula at each step of length
Here
The code below prices European or American calls and puts on a tree, and reproduces the two-period example below. It takes the up and down factors directly; crr_factors builds them from a volatility, and annualized_volatility estimates that volatility from a price history (e.g., SPY closes over the last 30 trading days).
import math
def binomial_price(S, X, r, u, d, n, option="call", american=False):
"""Price an option on a recombining binomial tree.
S: spot price; X: exercise price; r: risk-free rate per step (discrete);
u, d: up and down factors per step; n: number of steps.
"""
pi_u = (1 + r - d) / (u - d) # risk-neutral up probability
if not 0 < pi_u < 1:
raise ValueError("no-arbitrage requires d < 1 + r < u")
payoff = (lambda s: max(s - X, 0.0)) if option == "call" else (lambda s: max(X - s, 0.0))
# Values at expiry: node j has j down moves.
values = [payoff(S * u ** (n - j) * d ** j) for j in range(n + 1)]
# Backward induction: discounted risk-neutral expectation at each node.
for step in range(n - 1, -1, -1):
for j in range(step + 1):
hold = (pi_u * values[j] + (1 - pi_u) * values[j + 1]) / (1 + r)
if american: # exercise early if worth more
hold = max(hold, payoff(S * u ** (step - j) * d ** j))
values[j] = hold
return values[0]
def crr_factors(sigma, dt):
"""Cox-Ross-Rubinstein up/down factors from volatility: U = e^(σ√Δt), D = 1/U."""
u = math.exp(sigma * math.sqrt(dt))
return u, 1 / u
def annualized_volatility(close, window=30, periods_per_year=252):
"""Volatility from the last `window` log returns of a pandas Series of prices."""
import numpy as np
log_returns = np.log(close / close.shift(1)).dropna()
return log_returns.iloc[-window:].std() * math.sqrt(periods_per_year)
# The two-period example below: S = 50, X = 50, r = 5%, U = 1.356, D = 0.744
binomial_price(50, 50, 0.05, 1.356, 0.744, 2, "call") # 9.71
binomial_price(50, 50, 0.05, 1.356, 0.744, 2, "put") # 5.06
binomial_price(50, 50, 0.05, 1.356, 0.744, 2, "put", american=True) # 6.10NOTE
The volatility is held constant through the tree. If
Components
Basic assumptions of binomial tree:
- Begin at
. - Each step, the price moves up by a factor
or down by a factor , with (otherwise there is an arbitrage). By default .
Model one
The usual choice of
and with
Risk-Neutral Probability
Inferred from no arbitrage: in a risk-neutral world, the stock's expected price must grow at the risk-free rate.
Solving for
These are not the real-world probabilities: they are the probabilities that make discounting at the risk-free rate give the arbitrage-free price. Neither the actual probabilities nor the stock's expected return enter the option price.
One Period Binomial Model
Now assuming a European option, its payoffs after one step are:
Then the value today is the risk-neutral expected payoff, discounted:
Put-Call Parity
A fiduciary call (a call plus a risk-free bond paying
| Fiduciary call | Protective put | |
|---|---|---|
| If S ≤ X | ||
| If S ≥ X |
Then we have:
Risk-free Portfolio Method
Construct a risk-free portfolio by buying
shares and selling one call. Its value at time is: Then at
: Since the portfolio is risk free,
, then we solve for the hedge ratio: A risk-free portfolio must earn the risk-free rate,
. Substituting : which gives the same value as the risk-neutral probability method.
NOTE
If the market price of the call differs from this value, there is an arbitrage: trade the call against
Two Period Binomial Model
Same as one period model,
Example
Consider a non-dividend-paying stock currently priced at €50. A European-style call option written on this stock has two years until maturity and an exercise price of €50. The risk-free interest rate is assumed to be 5% per annum. Additionally, the up factor (U) is given as 1.356 and the down factor (D) is 0.744. Based on this information, we are tasked with calculating both the current value of the call option and the current value of the corresponding put option.
To solve the problem, we begin with
Step 1: calculating the stock prices in the binomial tree. The up-up price is
Step 2, we compute the option values at maturity. For the call option, we have
Step 3 involves calculating the risk-neutral probability. The up probability is
Next, we calculate intermediate option values. For the call,
Step 4, we calculate the initial values. The call option is worth
As an additional tip, using the put-call parity formula, we can verify:
The stock price tree and the call value tree in the chart are this example; the other two are the interest rate trees of Fixed Income.
Advance Exercise of American Option
- American call options on non-dividend stock will not be exercised early, because the call is worth more than its exercise value,
: it is worth more alive than dead. So an American call on a non-dividend stock is worth the same as a European one. - An American call on a dividend-paying stock may be exercised early, just before the stock goes ex-dividend, to capture the dividend.
- An American put may be exercised early when it is deep in the money: receiving
now and earning interest on it can be worth more than waiting.
Two Period Binomial Model of American Option
American option may be exercised early when:
- Exercise value is greater than arbitrage-free value
- Use the higher between exercise value and calculated price at each node.
NOTE
Calculate the option value if exercised, at every node, not only at expiry.
For example, if the put in the two-period example above were American, at the down node its exercise value would be
Interest Rate Option
The valuation process is the same as the standard binomial model, on an interest rate tree, but the payoff is multiplied by the notional principal (and the accrual period), e.g., a call pays
Black-Scholes Model
Assumption
The Black-Scholes model is the continuous version of the binomial model: the limit as the number of steps
- The underlying asset follows Geometric Brownian Motion: its returns are normally distributed and its price is lognormal, and it moves smoothly from price to price (continuous).
- The continuously compounded risk-free rate is constant and known. Investors can borrow and lend at the risk-free rate.
- The volatility of underlying asset is constant
- The market is frictionless:
- No transaction costs, no taxes, no regulatory constraints
- No arbitrage
- The underlying asset is highly liquid, and continuous trading
- Short selling of the underlying asset is permitted
- The options are European.
Basic Formula
The formula for Black-Scholes is:
The code prices calls and puts, with an optional continuous dividend yield
import math
def norm_cdf(z):
return 0.5 * (1 + math.erf(z / math.sqrt(2)))
def black_scholes(S, X, T, r, sigma, q=0.0, option="call"):
"""BSM price. r and q are continuously compounded; q is the dividend yield."""
d1 = (math.log(S / X) + (r - q + 0.5 * sigma ** 2) * T) / (sigma * math.sqrt(T))
d2 = d1 - sigma * math.sqrt(T)
if option == "call":
return S * math.exp(-q * T) * norm_cdf(d1) - X * math.exp(-r * T) * norm_cdf(d2)
return X * math.exp(-r * T) * norm_cdf(-d2) - S * math.exp(-q * T) * norm_cdf(-d1)
black_scholes(50, 50, 1, 0.05, 0.3) # 7.1156
black_scholes(50, 50, 1, 0.05, 0.3, option="put") # 4.6771 = C - S + X e^(-rT)With 500 steps and crr_factors(0.3, 1/500), binomial_price gives 7.1127 for the same call: the tree converges to Black–Scholes.
Initial Model
Similar to put-call parity, the formula shows the replicating portfolio:
- A call option is a leveraged stock investment: long
shares, financed by borrowing , i.e., short a risk-free zero-coupon bond. - A put option is long
units of a risk-free zero-coupon bond paying , plus short shares.
Conclusion of and
is the of call option is the of a put option is the risk-neutral probability that a call option will be exercised at expiration (ITM). is the risk-neutral probability that a put option will be exercised at expiration (ITM). , and likewise .
BSM Model with Carrying Benefits or Costs
With a continuous yield
A higher yield lowers the call's value and raises the put's: the holder of the option does not receive the yield.
Options On Future
Position
The position in the futures depends on the position in the option:
- Long call
Long futures position - Long put
Short futures position
The strike price
Black Model
The Black model is BSM with the futures price in place of the spot price. A futures position costs nothing to hold, so its "yield" equals the risk-free rate, and both terms are discounted:
where
IMPORTANT
In practice, options on futures are often American, and the option usually expires on or shortly before the futures' own expiry.
Interest Rate Option
The contract is similar to an option on futures and to an FRA. The position judgement and exercise case are exactly the same as for options on futures, with the FRA rate as the underlying: an interest rate call pays off when the rate rises above
: months until the option expires and the rate is set; : months until the interest is paid. So the payoff is discounted over months, and the accrual period is months. : today's forward rate for the period from to ; : the exercise rate. In , is replaced by . - A cap is a series of interest rate calls (caplets) and a floor a series of puts (floorlets). Long a cap and short a floor at the same exercise rate is a pay-fixed swap.
Swaption
A swaption is an option to enter a swap:
- A payer swaption is an option to enter into a swap as the fixed-rate payer (Long). It gains when rates rise: a call on the swap rate.
- A receiver swaption is an option to enter into a swap as the fixed-rate receiver (Short). It gains when rates fall: a put on the swap rate.
: the forward swap rate today, for a swap starting at the option's expiry; : the exercise (fixed) rate. - AP: the accrual period of each swap payment (e.g., 0.25 for quarterly).
- PVA: the present value annuity factor, the sum of the discount factors for the swap's payment dates.
- Payer minus receiver swaption, at the same exercise rate, is a forward pay-fixed swap (put-call parity).
Greeks
From Black-Scholes model,
We can understand it as a function of five inputs:
The Greeks are its partial derivatives: each measures the option's sensitivity to one input, holding the others constant.
i.e., the change in value as time passes (as
| Greek | Call | Put | Notes |
|---|---|---|---|
| Delta | Largest change near the money | ||
| Gamma | Highest at the money | ||
| Theta | Usually | Usually | Time decay |
| Vega | Highest at the money | ||
| Rho | Small for short-dated options |
Delta
For non-dividend paying stock:
NOTE
In this case,
For dividend-paying stock, where
NOTE
Delta and gamma together approximate the change in the option's value for a change in the stock price:
A delta-neutral portfolio holds
Gamma
NOTE
NOTE
Theta
Theta is usually negative for both call and put options, as they lose value as time passes (time decay). With:
- Exception: deep in-the-money European put options, which can gain value over time, as the strike they will receive gets closer to being paid.
Vega and Rho
- Vega is positive for both calls and puts: higher volatility raises the chance of large payoffs, while the loss is limited to the premium. It is highest at the money, and is the only Greek that needs a forecast (the volatility).
- Rho is positive for calls and negative for puts: a higher rate lowers the present value of the exercise price, which the call holder pays and the put holder receives.